﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/Edit.Master"  AutoEventWireup="true"  CodeBehind="Org_Company_Edit.aspx.cs" Inherits="Honestysoft.Baseframework.WebUI.SystemManage.Organization.Org_Company_Edit"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script language="javascript" type="text/javascript">
        var opts = null;
        function InitRules() {
            opts = {
                 rules:
                 {
					<%= txtCompCode.UniqueID%>:{required: true,maxlength: 200},
					<%= txtCompName.UniqueID%>:{required: true,maxlength: 200},
					<%= numSortCode.UniqueID%>:{required: true,number: true}					
                 },
                 messages:
                 {
					<%= txtCompCode.UniqueID%>:{required: "公司编号 请输入合适的值",maxlength: "公司编号 最多只能输入200个字符"},
					<%= txtCompName.UniqueID%>:{required: "公司全称 请输入合适的值",maxlength: "公司全称 最多只能输入200个字符"},
					<%= numSortCode.UniqueID%>:{required: "序号 请输入合适的值",number: "序号 请输入有效的整数"}					
                 },
                 onfocusout:false,
                 onclick:false,
                 onkeyup:false,
                 errorPlacement: function(error, element) {
                    $("#errorContainer").show();
                    error.html("<li>* "+error.html()+"</li>");
                    error.appendTo("#errorContainer");
                 },
                 wrapper:"li"
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <table cellpadding="0" width="100%" cellspacing="0" border="1" class="tEdit" style="border-bottom:0px;margin-top:2px;">
            <th style="border-bottom:0px">公司信息维护</th>
        </table>
        <table cellpadding="0" width="100%" cellspacing="0" border="1" class="tEdit">
		<tr>
			<td class="title1">公司编号</td>
			<td><asp:TextBox ID="txtCompCode" runat="server"  cssClass="input2" MaxLength="200" Width="96%"></asp:TextBox></td>
			<td class="title1">公司简称</td>
			<td><asp:TextBox ID="txtCompShortName" runat="server"  cssClass="input2" MaxLength="200" Width="96%"></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title1">公司全称</td>
			<td><asp:TextBox ID="txtCompName" runat="server"  cssClass="input2" MaxLength="200" Width="96%"></asp:TextBox></td>
			<td class="title1">英文名</td>
			<td><asp:TextBox ID="txtCompEName" runat="server"  cssClass="input2" MaxLength="200" Width="96%"></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title1">经济类型</td>
			<td><asp:DropDownList ID="ddlEconomicType" runat="server" cssClass="input2"  Width="98%"></asp:DropDownList></td>
			<td class="title1">成立日期</td>
			<td><asp:TextBox ID="dtpEstaDate" runat="server" cssClass="input2" onfocus="setday(this);" Width="96%"></asp:TextBox></td>
		</tr>
        <tr>
            <td class="title1">地址</td>
			<td colspan="3"><asp:TextBox ID="txtAddress" runat="server"  cssClass="input2" MaxLength="200" Width="98%"></asp:TextBox></td>
        </tr>
		<tr>
			<td class="title1">邮政编码</td>
			<td><asp:TextBox ID="txtPostalCode" runat="server"  cssClass="input2" MaxLength="10" Width="96%"></asp:TextBox></td>
			<td class="title1">联系电话</td>
			<td><asp:TextBox ID="txtTelephone" runat="server"  cssClass="input2" MaxLength="30" Width="96%"></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title1">传真</td>
			<td><asp:TextBox ID="txtFax" runat="server"  cssClass="input2" MaxLength="30" Width="96%"></asp:TextBox></td>
			<td class="title1">联系人</td>
			<td><asp:TextBox ID="txtLinkMan" runat="server"  cssClass="input2" MaxLength="200" Width="96%"></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title1">资质等级</td>
			<td><asp:DropDownList ID="ddlCompGrade" runat="server" cssClass="input2"  Width="98%"></asp:DropDownList></td>
			<td class="title1">资质证书号</td>
			<td><asp:TextBox ID="txtCompCertificate" runat="server"  cssClass="input2" MaxLength="200" Width="96%"></asp:TextBox></td>
		</tr>
        
		<tr>
			<td class="title1">是否有效</td>
			<td><asp:CheckBox ID="chkIsValid" runat="server"></asp:CheckBox></td>
			<td class="title1">序号</td>
			<td><asp:TextBox ID="numSortCode" runat="server"  cssClass="input2" onbeforepaste="numboxPaste();" onkeypress="isInt();" Width="96%"></asp:TextBox></td>
		</tr>
		<tr>
			<td class="title1">营业执照号码</td>
			<td colspan="3"><asp:TextBox ID="txtShopCard" runat="server"  cssClass="input2" MaxLength="200" Width="98%"></asp:TextBox></td>
			
		</tr>
        <tr>
            <td class="title1">主要业务</td>
			<td colspan="3"><asp:TextBox ID="txtVocaWork" runat="server" TextMode="MultiLine" Rows="5"  cssClass="input2" MaxLength="500" Width="98%"></asp:TextBox></td>
        </tr>
		<tr>
			
			<td class="title1">备注</td>
			<td colspan="3"><asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Rows="5" cssClass="input2" MaxLength="500" Width="98%"></asp:TextBox></td>
		</tr>
        </table>
        <asp:HiddenField runat="server" ID="hidParentID" />
        <asp:HiddenField runat="server" ID="hidCategoryID" />
        <asp:HiddenField runat="server" ID="hidIsInner" />
        <div class="save_area">
            <asp:Button runat="server" ID="btnOK" Text="确定" class="btn_normal" 
                onmouseover="this.className='btn_active'" OnClientClick="setSave();"
                onmouseout="this.className='btn_normal'" onclick="btnOK_Click"/>
            <input type="button" id="btnExit" value="取消" onclick="javascript:window.returnValue=false;window.close();" class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'" />
        </div>
        <script language="javascript" type="text/javascript">
            var isSave = 0;
            function setSave() {
                isSave = 1;
            }
            function clearCache() {
                var category = document.getElementById("<%=hidCategoryID.ClientID %>").value;
                if (category == '<%=System.Configuration.ConfigurationManager.AppSettings["CompanyCategory_XM"] %>' && isSave == 1) {
                    $.ajax({
                        type: "POST",
                        url: 'ClearCache.ashx?randID=' + escape(new Date()),
                        success: function (msg) {
                        }
                    });
                }
            }
            window.onunload = function () {
                clearCache();
            }
        </script>
</asp:Content>


